package librairies.liste;

import librairies.liste.list.ListeDC;

import org.junit.Test;

public class ListeDCTest
{
	@Test
	public void testexecut()	//ok
	{
		ListeDC<Integer> l = new ListeDC<Integer>();
		l.add(4).add(-8).add(55);
		System.out.println(l.add(7).add(-12));
		System.out.println(l.add(0, 17).add(0,18).add(3, 3));
		System.out.println(l.addAll(new ListeDC<Integer>().add(1).add(2).add(3)));
		System.out.println(l.addAll(0, new ListeDC<Integer>().add(-1).add(-2).add(-3)));
		System.out.println(l.addAll(5, new ListeDC<Integer>().add(8).add(88)));
		System.out.println(l.addAll(5, new ListeDC<Integer>()));
		System.out.println("3  : "+l.contains(3));
		System.out.println("-3 : "+l.contains(-3));
		System.out.println("16 : "+l.contains(16));
		ListeDC<Integer> l2 = new ListeDC<Integer>();
		l2.add(55).add(18).add(18).add(2);
		ListeDC<Integer> l3 = new ListeDC<Integer>();
		l3.add(55).add(-17).add(18).add(2);
		ListeDC<Integer> l4 = new ListeDC<Integer>();
		l4.add(55).add(18).add(18).add(2);
		System.out.println(l2+" ? "+l.containsAll(l2));
		System.out.println(l3+" ? "+l.containsAll(l3));
		System.out.println(l2+" == "+l4+" ? "+l2.equals(l4));
		System.out.println(l3+" == "+l4+" ? "+l3.equals(l4));
		System.out.println(l4+" remove(2) : "+l4.remove(2)+" -> "+l4);
		System.out.println(l4+" remove(2) : "+l4.remove(2)+" -> "+l4);
		System.out.println(l4+" remove(0) : "+l4.remove(0)+" -> "+l4);
		System.out.println(l4+" remove(0) : "+l4.remove(0)+" -> "+l4);
		System.out.println(l+" 1->5 : "+l.subList(1,5));
		System.out.println(l+" 5->1 : "+l.subList(5,1));
		System.out.println(l+" clear : "+l.clear()+" clear : "+l.clear());
		/*
			( 4 -8 55 7 -12 )
			( 18 17 4 3 -8 55 7 -12 )
			( 18 17 4 3 -8 55 7 -12 1 2 3 )
			( -1 -2 -3 18 17 4 3 -8 55 7 -12 1 2 3 )
			( -1 -2 -3 18 17 8 88 4 3 -8 55 7 -12 1 2 3 )
			( -1 -2 -3 18 17 8 88 4 3 -8 55 7 -12 1 2 3 )
			3  : 8
			-3 : 2
			16 : -1
			( 55 18 18 2 ) ? true
			( 55 -17 18 2 ) ? false
			( 55 18 18 2 ) == ( 55 18 18 2 ) ? true
			( 55 -17 18 2 ) == ( 55 18 18 2 ) ? false
			( 55 18 18 2 ) remove(2) : 18 -> ( 55 18 2 )
			( 55 18 2 ) remove(2) : 2 -> ( 55 18 )
			( 55 18 ) remove(0) : 55 -> ( 18 )
			( 18 ) remove(0) : 18 -> ( )
			( -1 -2 -3 18 17 8 88 4 3 -8 55 7 -12 1 2 3 ) 1->5 : ( -2 -3 18 17 8 )
			( -1 -2 -3 18 17 8 88 4 3 -8 55 7 -12 1 2 3 ) 5->1 : ( )
			( -1 -2 -3 18 17 8 88 4 3 -8 55 7 -12 1 2 3 ) clear : ( ) clear : ( )
		 */
	}
}
